{% extends "entries.html" %}
{% load i18n %}

{% load fftogo_tags %}

{% block title %}
    {{ profile.name }}
{% endblock %}

{% block share %}
    {% if not type %}
        {% ifequal request.session.nickname profile.nickname %}
            {{ block.super }}
        {% endifequal %}
    {% endif %}
{% endblock %}

{% block below_share %}
    <div class="profile">
        {% if profile.nickname %}
            <img class="picture" src="/{{ profile.nickname }}/gravatar/" alt="{{ profile.name }}" />
        {% endif %}
        <strong><a href="{% if profile.nickname %}{% url user profile.nickname %}{% else %}{{ request.path }}{% endif %}">{{ profile.name }}</a></strong>
        {% if request.session.nickname and profile.nickname %}
            {% ifnotequal request.session.nickname profile.nickname %}
                <div class="section">
                    <form method="post" action="{% if subscribed %}{% url user_unsubscribe profile.nickname %}{% else %}{% url user_subscribe profile.nickname %}{% endif %}">
                        <input type="submit" value="{% if subscribed %}{% trans "Unsubscribe" %}{% else %}{% trans "Subscribe" %}{% endif %}" />
                    </form>
                </div>
            {% endifnotequal %}
        {% endif %}
        <div class="section">
            {% for service in profile.services %}
                <a class="service" href="{{ request.path }}?service={{ service.id }}"><img src="{{ service.iconUrl|iconproxy }}" alt="{{ service.name }}" /></a>
            {% endfor %}
        </div>
        {% if profile.nickname %}
            <div class="section">
                {% if not type %}
                    {% trans "Feed" %}
                {% else %}
                    <a href="{% url user profile.nickname %}">{% trans "Feed" %}</a>
                {% endif %}
                -
                {% ifequal type 'comments' %}
                    {% trans "Comments" %}
                {% else %}
                    <a href="{% url user_type profile.nickname,"comments" %}">{% trans "Comments" %}</a>
                {% endifequal %}
                -
                {% ifequal type 'likes' %}
                    {% trans "Likes" %}
                {% else %}
                    <a href="{% url user_type profile.nickname,"likes" %}">{% trans "Likes" %}</a>
                {% endifequal %}
                -
                {% ifequal type 'discussion' %}
                    {% trans "Both" %}
                {% else %}
                    <a href="{% url user_type profile.nickname,"discussion" %}">{% trans "Both" %}</a>
                {% endifequal %}
                -
                {% ifequal type 'friends' %}
                    {{ profile.name }}{% trans " and Friends" %}
                {% else %}
                    <a href="{% url user_type profile.nickname,"friends" %}">{{ profile.name }}{% trans " and Friends" %}</a>
                {% endifequal %}
            </div>
        {% endif %}
    </div>
{% endblock %}

{% block user_prefix %}
    {% if type %}
        {{ block.super }}
    {% endif %}
{% endblock %}

{% block friend_of %}{% endblock %}

{% block hide %}{% endblock %}

{% block summary %}
    {% if type %}
      {{ block.super }}
    {% endif %}
{% endblock %}
